import { requestTool } from '../index.js'

const rooturl = '/Article'

const ArticleMap = {
    getArticle:{
        method: 'get',
        url: '',
        ContentType: 'rest',
    },
    ArticleIsLike:{
        method: 'post',
        url: '/isLikes',
        ContentType: 'form',
        submitData: {
            userId: 'userId',
            headTo: 'articleId'
        }
    },
    beLiked:{
        method: 'post',
        url: '/Likes',
        ContentType: 'form',
        submitData: {
            userId: 'userId',
            articleId: 'articleId'
        }
    },
    getComments:{
        method: 'get',
        url: '/ShowComments',
        ContentType: 'rest',
    },
    isCollection:{
        method: 'post',
        url: '/isCollection',
        ContentType: 'form',
        submitData: {
            userId: 'userId',
            articleId: 'articleId'
        }
    },
    getCollection: {
        method: 'put',
        url: '/AddCollection',
        ContentType: 'rest',
    },
    DeleteCollection: {
        method: 'delete',
        url: '/DeleteCollection',
        ContentType: 'rest'
    },
    AddComments:{
        method: 'post',
        url: '/AddComments',
        ContentType: 'form',
        submitData: {
            userId:"userId",
            articleId: 'articleId',
            comment: 'comment',
        }
    }
}

export default requestTool(ArticleMap,rooturl)